X-Git-Url: https://permondes.de/gitweb/Analog_Engine.git/blobdiff_plain/4124db17783ef95a2a0020b4a7624b41c0f1b0e5..92b24062f5676c290b5d041358aaa25b49f2f4f2:/scripts/EP1%2010.02%20Forced%20Harmonic%20Oscillator.LACE?ds=sidebyside diff --git a/scripts/EP1 10.02 Forced Harmonic Oscillator.LACE b/scripts/EP1 10.02 Forced Harmonic Oscillator.LACE new file mode 100644 index 0000000..6e51b64 --- /dev/null +++ b/scripts/EP1 10.02 Forced Harmonic Oscillator.LACE @@ -0,0 +1,33 @@ +# Forced Damped_Harmonic Oscillator +# x'' + 2*delta*x' + omega.0^2*x = A cos (omega.f t) + +# generating oscillation with omega.f +# f'' = -omega.f^2*f +coefficient.1(-1) -> -f0 # amplitude +coefficient.2 -> omega^2 +iintegrate f'' -> -f' +iintegrate -f' -> f + IC: -f0 +cmultiply f, omega^2 -> omega^2*f +invert omega^2*f -> -omega^2*f +assign -omega^2*f -> f'' +invert f -> -f +output f -> y + +# forced damped harmonic oscillation +# x'' = -(2*delta*x' + omega.0^2*x) + A cos (omega.f t) +coefficient.5(-1) -> -x0 # amplitude of oscillation +coefficient.6 -> 2*delta # attenuation +coefficient.7 -> omega.0^2 # Eigenfrequency of this oscillator, ^2 + +iintegrate x'' -> -x' +invert -x' -> x' +cmultiply x', 2*delta -> 2*delta*x' + +iintegrate -x' -> x + IC: -x0 +cmultiply x, omega.0^2 -> omega.0^2*x +isum 2*delta*x', omega.0^2*x, -f -> -(2*delta*x'+omega.0^2*x)-f +assign -(2*delta*x'+omega.0^2*x)-f -> x'' + +output(x) -> x